import 'bootstrap/dist/css/bootstrap.css';
import '../css/index2.scss';

require('bootstrap/dist/js/bootstrap.js');
require('./common.js');


$('#sidebar-menu a[href="key_words.html"]').addClass('active')
$('#sidebar-menu a[href="key_words.html"]').parent('li').addClass('active');

$("#key").val(''); 
$('#search').click(function() {
	let key = $("#key").val();
	if(key === '') {
	}else {
		let link = 'key_detail.html?key_word='+key;
		window.location.href = link
	}
})

document.onkeydown=keyDownSearch; 
    
function keyDownSearch(e) {  
    // 兼容FF和IE和Opera  
    var theEvent = e || window.event;  
    var code = theEvent.keyCode || theEvent.which || theEvent.charCode;  
    if (code == 13) {
    	$('#search').click();    
        return false;  
    }  
    return true;  
} 

